home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 201-225 / disk_202 / vlt / docs / rexx.zoo / rexxarplib.doc next >
Text File  |  1989-05-04  |  25KB  |  563 lines

  1.  
  2.  
  3.                    RexxArpLib.Library Version 2.0
  4.                    ==============================
  5.  
  6.                          Copyright (C) 1988
  7.                                 by
  8.                           W.G.J. Langeveld
  9.  
  10.  
  11.  
  12.     Originally, this library was supposed to be an ARexx interface to the
  13. ARP library. However, although it indeed interfaces to some of the ARP
  14. functions, it has become much more of an interface to various Intuition
  15. functions. I have considered renaming the library to something else, but by now
  16. everyone refers to it by this name, so I'll leave it like it is.
  17.     Version 2.0 is pretty much the final version. The library has grown
  18. considerably since the first release, and it is about as big as a library should
  19. ever get. If I find the need for a lot of other functions, they'll have to go
  20. into a different library.
  21.     The library contains over 50 functions now. One is Charlie's famous ARP
  22. file requester, another is a simple combination string/boolean requester that
  23. does auto-everything. All you have to do is specify the strings you want it to
  24. display. Then there are environment variable things, and a simple message window
  25. you can keep hanging around. On popular request, there is now a wildcard
  26. expander (not to be confused with a 'directory' function!) that uses the new Rexx
  27. Variables Interface (RVI).
  28.     The major new things though, are the interface routines to Intuition.
  29. You can now open screens and windows, add boolean and string gadgets to them as
  30. well as menus, draw lines and areas and circles and whatever. You can make your
  31. gadgets, menus, and windows send messages to wherever you like and you can 
  32. format those messages, though they have to ARexx messages, in any way you like,
  33. using any information that's currently available. All this is rather hard to
  34. explain. You'll really have to play with it and look at some examples.
  35.     As usual, this stuff is NOT public domain, but freely distributable.
  36.  
  37.     So have fun!
  38.  
  39.     Willy.
  40.  
  41.  
  42.  
  43. The functions are listed below.
  44. --------------------------------------------------------------------------------
  45.  
  46. GetFile
  47. =======
  48.  
  49.     Calling sequence:
  50.  
  51.     result = GetFile(x, y, pathname, filename, hailstring, publicscreen)
  52.  
  53.     x            = x coordinate of top-left corner of requester.
  54.     y            = y coordinate of top-left corner of requester.
  55.     pathname     = Default path name, first path name to be searched.
  56.         filename     = Default file name.
  57.         hailstring   = User instruction string.
  58.         result       = The selected path/file name
  59.         publicscreen = Name of a public screen (optional).
  60.  
  61.     All arguments are optional, but the order is fixed. Therefore if only
  62. the second or third argument is specified, it needs to be prefixed by
  63. sufficient commas.
  64.     The selected path concatenated with the selected file name are
  65. returned as 'result'. Notice, that the result is not necessarily an existing
  66. file. It is up to the user to ascertain that the result is suitable for his
  67. purposes. If the user hits "CANCEL", the result is an empty string. Notice
  68. that another way the result comes out to be empty is when the user leaves the
  69. requester hitting "OKAY" when both the path and file string gadgets are
  70. empty.
  71.     If 'publicscreen' is specified, the function will try to find the screen
  72. of that name. If it is set up properly, the requester will open on that 
  73. screen. If not, the requester will appear on the Workbench. The mechanism that
  74. is currently used for this is subject to change.
  75.  
  76. Request
  77. =======
  78.  
  79.     Calling sequence:
  80.  
  81.     result = Request(x, y, prompts, string, okaytext, canceltext, publicscreen)
  82.  
  83.     x             = x coordinate of top-left corner of requester.
  84.     y             = y coordinate of top-left corner of requester.
  85.         prompts       = A string which will be displayed above any gadgets.
  86.                         Any embedded '\' characters will be treated as a line
  87.                         break.
  88.         string        = The default string to be displayed in a string gadget.
  89.                         If omitted, no string gadget will be provided.
  90.     okaytext      = The text to be used for an Okay gadget.
  91.                     If omitted, no okay gadget will be provided.
  92.     canceltext    = The text to be used for a Cancel gadget.
  93.                     If omitted, no cancel gadget will be provided.
  94.         publicscreen  = Name of a public screen (optional).
  95.  
  96.     All arguments are optional, but the order is fixed. Therefore if
  97. only the second or third argument is specified, it needs to be prefixed by
  98. sufficient commas.
  99.     If a string gadget is present, but no okay gadget, the string
  100. will be returned after modification by the user in result when the user
  101. hits <return>.
  102.     If both a string gadget and an okay gadget are present, the string
  103. will be returned in result only when the user clicks on the okay gadget.
  104.     If no string gadget is present, clicking of the okay gadget (if 
  105. present) will cause the return in result of the string "OKAY".
  106.     In any case, if the user clicks either the cancel gadget or the
  107. close gadget, an empty string will be returned. Notice that another way the
  108. result comes out to be empty is when the user leaves the requester hitting
  109. "OKAY" when the string gadget is empty.
  110.     If 'publicscreen' is specified, the function will try to find the screen
  111. of that name. If it is set up properly, the requester will open on that 
  112. screen. If not, the requester will appear on the Workbench. The mechanism that
  113. is currently used for this is subject to change.
  114.  
  115. PostMsg
  116. =======
  117.  
  118.     This function sets up a window with text. It returns immediately to
  119. the caller. Subsequent calls will erase lines and fill them with new text.
  120. If a line has zero length, the line will NOT be erased. This has the advantage
  121. that you can change the text in a line without redisplaying text in another
  122. line. It has the disadvantage that in order to erase lines, you have to
  123. specify at least a single space for each line you want to erase.
  124. The window will remain open, until a call is made with too few arguments. 
  125. This is NOT a reentrant function: there is only one window pointer, and
  126. subsequent calls by ANY REXX process will affect the window.
  127.  
  128.     Calling sequence:
  129.  
  130.     result = PostMsg(x, y, strings, publicscreen)
  131.  
  132.     x             = x coordinate of top-left corner of requester.
  133.     y             = y coordinate of top-left corner of requester.
  134.         string        = A string which will be displayed above any gadgets.
  135.                         Any embedded '\' characters will be treated as a line
  136.                         break.
  137.     result        = 1 for success, 0 otherwise.
  138.         publicscreen  = Name of a public screen (optional).
  139.  
  140.     All arguments are optional, but the order is fixed. Therefore if
  141. only the second or third argument is specified, it needs to be prefixed by
  142. sufficient commas.
  143.     Examples:
  144.        Postmsg(50, 50, "This is line 1\This is line 2")
  145. will cause a window to appear with two lines of text. A subsequent call
  146.        Postmsg(50, 50, "\This is a new line 2")
  147. will cause the second line of the window to be replaced by the new text. The
  148. construct:
  149.        PostMsg(50, 50, " \")
  150. will erase the first line but leave the second one alone (notice the space).
  151.     If too few arguments are specified, this function will cause the
  152. window to be closed.
  153.     If 'publicscreen' is specified, the function will try to find the screen
  154. of that name. If it is set up properly, the requester will open on that 
  155. screen. If not, the requester will appear on the Workbench. The mechanism that
  156. is currently used for this is subject to change.
  157.  
  158. Getenv
  159. ======
  160.  
  161.     Calling sequence:
  162.  
  163.     result = Getenv(variable)
  164.  
  165.     variable   = Environment variable.
  166.         result     = The value of the environment variable.
  167.  
  168.     This function gets the value of an environment variable. If the
  169. variable does not exist, an empty string will be returned.
  170.  
  171. Setenv
  172. ======
  173.  
  174.     Calling sequence:
  175.  
  176.     result = Setenv(variable, valuestring)
  177.  
  178.     variable    = Environment variable.
  179.     valuestring = The new value for the environment variable.
  180.         result      = Always 1.
  181.  
  182.     This function (creates and) sets the environment variable to a
  183. a (new) value. If 'valuestring' is missing, the function will remove the
  184. environment variable.
  185.  
  186. ScreenToBack, ScreenToFront
  187. ===========================
  188.  
  189.     These functions depth arrange screens. If no argument is specified,
  190. the screen operated on is the Workbench screen. If the name of a public screen
  191. is specified, it will be affected.
  192.  
  193.     Calling sequence:
  194.  
  195.     result = screentoback(publicscreen)
  196.     result = screentofront(publicscreen)
  197.  
  198.         publicscreen  = Name of a public screen (optional).
  199.  
  200.     The argument is optional. If 'publicscreen' is specified, the function
  201. will try to find the screen of that name. If it is set up properly, the screen
  202. will be moved to the back/front. If not, the function will operate on the
  203. Workbench screen. The mechanism that is currently used for this is subject to
  204. change.
  205.  
  206. ScreenRows, ScreenCols, ScreenLace
  207. ==================================
  208.  
  209.     These functions retrieve info about screens. If no argument is
  210. specified, the screen operated on is the Workbench screen. If the name of a
  211. public screen is specified, it will be used.
  212.  
  213.     Calling sequence:
  214.  
  215.     result = ScreenRows(publicscreen)     /* return number of rows */
  216.     result = ScreenCols(publicscreen)     /* return number of columns */
  217.     result = ScreenLace(publicscreen)     /* return interlace */
  218.  
  219.         publicscreen  = Name of a public screen (optional).
  220.  
  221.     These functions retrieve the number of rows and columns in pixels.
  222. The function screenlace() returns 0 if the screen is not interlaced, and 1
  223. if it is. The function returns -1 if the information could not be found.
  224.     The argument is optional.  If 'publicscreen' is specified, the function
  225. will try to find the screen of that name. If it is set up properly, information
  226. about the screen will be returned. If not, the function will operate on the
  227. Workbench screen. The mechanism that is currently used for this is subject to
  228. change.
  229.  
  230. OpenScreen, CloseScreen
  231. =======================
  232.  
  233.     These functions allow you to open public custom screens.
  234.  
  235.     Calling sequence:
  236.  
  237.     result = OpenScreen(topedge, depth, modes, defaulttitle, publicscreen)
  238.     result = CloseScreen(publicscreen)
  239.  
  240.     topedge       = Y coordinate of top edge of the screen.
  241.     depth         = Number of bitplanes.
  242.     modes         = Viewmodes and type of screen. The currently supported
  243.                         viewmodes are "HIRES", "LACE", and "HAM". The one
  244.                         currently supported type is "SCREENBEHIND".
  245.     defaulttitle  = Default title for the screen title bar.
  246.         publicscreen  = Name of a public screen (optional).
  247.  
  248.     result        = 0 on failure, 1 on success.
  249.  
  250.     The last argument is required, therefore you must supply sufficient
  251. commas and a name for the public screen to be created/closed. With openscreen,
  252. leaving out any of the other arguments will cause defaults to be used. They are
  253. topedge = 0, depth = 2, modes = 0 (meaning LORES, no LACE), and no default
  254. title. This is equivalent to specifying 0 for all arguments (a depth of 0 is
  255. illegal and will be changed to 2). All created screens are CUSTOM screens.
  256.     The mechanism that is currently used for public screens is subject to
  257. change.
  258.     ***NOTE: It is perfectly possible to apply closescreen() to another
  259. application's custom screen (if it is public, using the same conventions as
  260. used here). If you attempt this, a software failure is almost guaranteed. Only
  261. use closescreen() on screens you created using openscreen()!
  262.  
  263. FileList
  264. ========
  265.  
  266.     This function does ARP pattern matching. Given a pattern, it will
  267. return all files and/or directories matching the pattern.
  268.  
  269.     Calling sequence:
  270.  
  271.     number = FileList(pattern, files, flags)
  272.  
  273.     pattern       = a search pattern using ARP wildcards.
  274.         files         = the NAME of a stem variable to be created.
  275.         flags         = Directories - directories only. Files - files only.
  276.  
  277.     number        = the number of files matching the pattern.
  278.  
  279.     When files with names matching the  pattern are found, a stem variable
  280. with the name given by 'files' is created in the current Rexx context. It has
  281. fields 1, 2, ...., <number> containing the names of the files. The last argument
  282. is optional: when an F is specified, only files are listed. When a D is specified
  283. only directories are listed. Example: a simple directory program looks like
  284.  
  285.     /* Directory program, list everything */
  286.     arg pattern
  287.     if pattern = "" then pattern = "*"
  288.     numfils = FileList(pattern, myfilelist)
  289.     do i = 1 to numfils; say myfilelist.i; end
  290.     exit
  291.  
  292. CreateHost
  293. ==========
  294.  
  295.     This function allows you to create a single window with gadgets, menus,
  296. text, graphics, etc. Of course, multiple copies of the function may be started
  297. up to create more windows, but each must have a unique 'controlport'. This
  298. function should be started up asynchronously, using runwsh, and one should wait
  299. for the 'controlport' to appear using e.g. WaitForPort.
  300.  
  301.     Calling sequence:
  302.  
  303.     runwsh 'call CreateHost(controlport, notifyport, publicscreen)'
  304.  
  305.     controlport   = Name of the message port this window should listen to.
  306.     notifyport    = Name of the message port that should be notified when
  307.                         an IDCMP event occurs.
  308.         publicscreen  = Name of a public screen (optional).
  309.  
  310.     When the function is first called, it will open a message port with the
  311. name given by "controlport". The function will then wait for commands coming in
  312. through this port. This may be accomplished using one of many intuition
  313. functions, as explained later. One of the first commands should be to open the
  314. associated window by calling OpenWindow (see later). It will then open a window
  315. as specified in the OpenWindow call. If any message arrives through the IDCMP of
  316. this window, a REXX message will be sent to the port specified as "notifyport"
  317. which either you should set up in your rexx macro for this purpose, or should be
  318. an otherwise existing rexx message port belonging to another process. In the
  319. case you set up your own port, make sure the message is replied to after having
  320. been  retrieved and examined. If the  notifyport does not exist, no message will
  321. be sent. The window can be closed by the rexx macro by calling the function
  322. CloseWindow (see later). On startup, the notify port is the same for all classes
  323. of messages. This can be changed using the SetNotify() function, see later.
  324.     The last argument is optional.  If 'publicscreen' is specified, the
  325. function will try to find the screen of that name. If it is set up properly, the
  326. window will be opened on it. If not, the window will be opened on the Workbench
  327. screen. The mechanism that is currently used for this is subject to change.
  328.  
  329. Supported Intuition (and other) functions with createhost
  330. =========================================================
  331.  
  332.     The following functions are implemented as CreateHost functions. The 
  333. first argument is always the name of the control port of the host that is
  334. supposed to execute the command. A little secret: you can send commands
  335. *directly* to the controlport also by constructs like "Address controlport
  336. commandname". However, this only works for commands without further arguments.
  337. For example, from WShell, "address controlport CloseWindow" is equivalent to
  338. "call CloseWindow(controlport)". This can come in incredibly handy at times.
  339. For example, when you want command hosts to send message to themselves: you
  340. can tell a host to send IDCMP events of class CLOSEWINDOW to itself...
  341. Boggles the mind yet? Read on...
  342.  
  343.    call ActivateGadget(controlport, gadgetid)
  344.         Tries to activate a string gadget with id 'gadgetid'.
  345.  
  346.    call ActivateWindow(controlport)
  347.  
  348.    call AreaCircle(controlport, xcenter, ycenter, radius)
  349.  
  350.    call AreaDraw(controlport, x, y)
  351.         Only 100 vertices are currently allowed before each AreaEnd().
  352.  
  353.    call AreaEllipse(controlport, xcenter, ycenter, radius1, radius2)
  354.  
  355.    call AreaEnd(controlport)
  356.         Only 100 vertices are currently allowed before each AreaEnd().
  357.  
  358.    call AreaMove(controlport, x, y) 
  359.         Only 100 vertices are currently allowed before each AreaEnd().
  360.  
  361.    call AddGadget(controlport, x, y, gadgetid, gadgettext, messagetext, hsize)
  362.         If hsize is specified, this call creates a string gadget of that
  363.         horizontal size and gadgettext is the default string. If hsize is
  364.         not specified, this call creates an autosizing boolean gadget, where
  365.         the text in gadgettext is displayed. In both cases, the string in
  366.         messagetext is sent to controlport (see also under OpenWindow). As
  367.         usual, the gadgettext for boolean gadgets may contain \ characters
  368.         to cause multiple lines of text (See e.g. PostMsg()).
  369.  
  370.    call AddItem(controlport, itemname, message, commandchar, mutualexclude, flag)
  371.         Add a new item with name 'itemname'. Optionally, you may specify a
  372.         command key abbreviation (right-Amiga 'commandchar') and a mutual exclude
  373.         mask. See Intuition manual. A special value of the mutual exclude mask
  374.         is -1: this means that the item will be toggle selectable. If the flag
  375.         argument is present (any value), the item will be on the same line as
  376.         the previous item.
  377.         See also AddMenu(), AddSubItem(), FreeMenu(), SetItem().
  378.  
  379.    call AddMenu(controlport, menuname)
  380.         Add a new menu with name 'menuname'. See also AddItem(), AddSubItem(),
  381.         FreeMenu(), SetItem().
  382.  
  383.    call AddSubItem(controlport,itemname,message,commandchar,mutualexclude,flag)
  384.         Add a new subitem with name 'itemname'. Optionally, you may specify a
  385.         command key abbreviation (right-Amiga 'commandchar') and a mutual exclude
  386.         mask. See Intuition manual. A special value of the mutual exclude mask
  387.         is -1: this means that the item will be toggle selectable. If the flag
  388.         argument is present (any value), the subitem will be on the same line as
  389.         the previous item. See also AddMenu(), AddItem(), FreeMenu(), SetItem().
  390.  
  391.    call BackFill(controlport)
  392.         This is not an intuition function. See OpenWindow().
  393.  
  394.    call CloseWindow(controlport)
  395.         This function closes the window, deallocates all resources and causes
  396.         the host to exit. CloseWindow(), Exit(), Quit() and Stop() are identical.
  397.  
  398.    call Draw(controlport, x, y)
  399.  
  400.    call DrawCircle(controlport, xcenter, ycenter, radius)
  401.  
  402.    call DrawEllipse(controlport, xcenter, ycenter, radius1, radius2)
  403.  
  404.    call Exit(controlport)
  405.         This function closes the window, deallocates all resources and causes
  406.         the host to exit. CloseWindow(), Exit(), Quit() and Stop() are identical.
  407.  
  408.    call Flood(controlport, mode, x, y)
  409.         If mode is 0, the flood continues until pixels of the outline pen
  410.         color are found. If the mode is 1, the flood continues until pixels
  411.         of a different color than the pixel at x, y are found.
  412.  
  413.    call FreeMenu(controlport)
  414.         Gets rid of any attached menu.
  415.  
  416.    call ModifyHost(controlport, IDCMPclass, messagestring)
  417.         This function allows you to set the message string that is sent to 
  418.         the notifyport for a particular class of IDCMP events. See OpenWindow.
  419.  
  420.    call Move(controlport, x, y)
  421.  
  422.    call OpenWindow(controlport, leftedge, topedge, width, height,
  423.                                 idcmp, flags, title)
  424.         width and height may be set to 0 to get the maximum size of the window.
  425.         idcmp is a string that specifies the IDCMP for the window. Supported are:
  426.  
  427.            IDCMP message    |  default arg[0]          
  428.         --------------------+-------------------
  429.           "CLOSEWINDOW"     |  "%l"            
  430.           "MOUSEBUTTONS"    |  "%l"            
  431.           "GADGETUP"        |  <its string>   
  432.           "GADGETDOWN"      |  <its string>   
  433.           "MENUPICK"        |  "%l"            
  434.           "NEWSIZE"         |  "%l"            
  435.           "VANILLAKEY"      |  "%l"            
  436.           "RAWKEY"          |  "%l"            
  437.           "NEWPREFS"        |  "%l"            
  438.           "DISKINSERTED"    |  "%l"            
  439.           "DISKREMOVED"     |  "%l"            
  440.           "ACTIVEWINDOW"    |  "%l"            
  441.           "INACTIVEWINDOW"  |  "%l"            
  442.           "REFRESHWINDOW"   |  "%l"            
  443.           "MOUSEMOVE"       |  "%l"            
  444.  
  445.         Any number of these may be specified in the OpenWindow call, by conca-
  446.         tenation. When any of these messages arrives at the IDCMP, a REXX
  447.         message is created with a particular string in Arg[0]. This string is
  448.         by default the one given in the table above, after substitution has
  449.         taken place for any two-character sequence starting with '%'.
  450.         The following substitutions will be made:
  451.             
  452.             %% :              A single % sign
  453.             %a : Vanillakeys: code is interpreted as an ASCII character.
  454.             %b : Buttons:     SELECTDOWN, SELECTUP, MENUDOWN, MENUUP.
  455.             %c : Code:        is given as an integer.
  456.             %d : Gadgets:     the gadget id.
  457.             %g : Gadgets:     the string inside a string gadget goes here.
  458.             %h : Newsize:     the window height.
  459.             %i : Menus:       the item number.
  460.             %l : "Literal":   the name of the IDCMP class.
  461.             %m : Menus:       the menu number.
  462.             %q : Qualifier:   is given as an integer.
  463.             %s : Menus:       the sub-item number.
  464.             %t : Time:        the number of seconds since January 1 1980.
  465.             %w : Newsize:     the window width.
  466.             %x : Mouse:       the X position of the mouse pointer.
  467.             %y : Mouse:       the Y position of the mouse pointer.
  468.             %0-%15 :          which Arg to use.
  469.  
  470.         For example, if the message string of some gadget is
  471.  
  472.             "Mouse is %x, %y%3gadget string is %g"
  473.  
  474.         the following might be sent to the notifyport in Arg[0] when someone
  475.         hits return in that gadget, after typing "This is a test":
  476.  
  477.             Mouse is 320, 200
  478.  
  479.         while Arg[3] of the Rexx message would contain the string:
  480.  
  481.             gadget string is This is a test
  482.  
  483.         The default string for non-gadgets/menus is "%l", which means that they
  484.         only report their name. For example, if one would click in the window,
  485.         one would only receive a message with "MOUSEBUTTONS" in Arg[0]. However,
  486.         all arguments of the message that will be sent to the notifyport may be
  487.         changed using the ModifyHost() call, see there. Any of the escape
  488.         sequences above may be used in any string. Obviously, sometimes
  489.         particular sequences may not be very appropriate for certain uses.
  490.  
  491.         'flags' specifies the various window flags. Currently supported are:
  492.         "WINDOWCLOSE", "WINDOWSIZING" (and "SIZEBRIGHT", "SIZEBBOTTOM"),
  493.         "WINDOWDEPTH", "WINDOWDRAG", "BORDERLESS", "ACTIVATE" and
  494.         "NOCAREREFRESH".   A special flag can be set: "BACKFILL". It implies
  495.         a call to BackFill() after opening the window. It sets the window's
  496.         background to the current requester-style background color.
  497.  
  498.    call Quit(controlport)
  499.         This function closes the window, deallocates all resources and causes
  500.         the host to exit. CloseWindow(), Exit(), Quit() and Stop() are identical.
  501.  
  502.    call ReadGadget(controlport, gadgetid)
  503.         This function will cause the gadget 'gadgetid' to send its message
  504.         text (after substitutions, of course).
  505.  
  506.    call RectFill(controlport, xmin, ymin, xmax, ymax) 
  507.  
  508.    call RefreshGadgets(controlport)
  509.  
  510.    call RemoveGadget(controlport, gadgetid)
  511.  
  512.    call SetAPen(controlport, pennumber)
  513.  
  514.    call SetBPen(controlport, pennumber)
  515.  
  516.    call SetDrMd(controlport, mode)
  517.         mode can be any of JAM1, JAM2, INVERSVID or COMPLEMENT.
  518.  
  519.    call SetDrPt(controlport, pattern)
  520.         pattern is interpreted as a long integer of which the bits form the
  521.         pattern.
  522.  
  523.    call SetFont(controlport, FontName, FontSize)
  524.  
  525.    call SetItem(controlport, menunumber, itemnuber, subitemnumber, action)
  526.         Given menu, item (and optionally subitem) numbers, perform action on
  527.         the menu item. Supported are ON and OFF, to set or clear the check mark.
  528.  
  529.    call SetNotify(controlport, IDCMPclass, newnotifyport)
  530.         This function allows you to change the name of the NotifyPort that 
  531.         message strings are sent to for a particular class of IDCMP events.
  532.  
  533.    call SetReqColor(controlport, pentype, colornumber)
  534.         This function allows you to change the color number assigned to
  535.         one of the various pentypes. Currently the pentypes are: BLOCKPEN,
  536.         DETAILPEN, BACKGROUNDPEN, PROMPTPEN, BOXPEN, SHADOWPEN, OKAYPEN,
  537.         and CANCELPEN.
  538.  
  539.    call SetOPen(controlport, pennumber)
  540.  
  541.    call SetRGB4(controlport, pennumber, red, green, blue)
  542.         red, green and blue are values for the RGB content of the color to be
  543.         assigned to the pen. The values are taken mod 16.
  544.  
  545.    call Stop(controlport)
  546.         This function closes the window, deallocates all resources and causes
  547.         the host to exit. CloseWindow(), Exit(), Quit() and Stop() are identical.
  548.  
  549.    call Text(controlport, string) 
  550.  
  551.    call WindowText(controlport, text)
  552.         The string in text may contain \'s to indicate multiple lines of text.
  553.  
  554.    call WindowToBack(controlport)
  555.  
  556.    call WindowToFront(controlport)
  557.  
  558.    call WritePixel(controlport, x, y)
  559.  
  560.  
  561.  
  562.  
  563.